package com.sena.exception;


import com.sena.enums.ResultCodeEnum;

/**
 * @author Admin
 */
public class ThreadRunTimeException extends RuntimeException {
    private ResultCodeEnum resultCodeEnum;

    public ThreadRunTimeException(ResultCodeEnum resultCodeEnum, String message) {
        super(message);
        this.resultCodeEnum = resultCodeEnum;
    }

    public ThreadRunTimeException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getDescription());
        this.resultCodeEnum = resultCodeEnum;
    }

    public ResultCodeEnum getResultCodeEnum() {
        return resultCodeEnum;
    }

    public void setResultCodeEnum(ResultCodeEnum resultCodeEnum) {
        this.resultCodeEnum = resultCodeEnum;
    }
}
